(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
empty(nil) → true
empty(cons(x, y)) → false
tail(nil) → nil
tail(cons(x, y)) → y
head(cons(x, y)) → x
zero(0) → true
zero(s(x)) → false
p(0) → 0
p(s(0)) → 0
p(s(s(x))) → s(p(s(x)))
intlist(x) → if_intlist(empty(x), x)
if_intlist(true, x) → nil
if_intlist(false, x) → cons(s(head(x)), intlist(tail(x)))
int(x, y) → if_int(zero(x), zero(y), x, y)
if_int(true, b, x, y) → if1(b, x, y)
if_int(false, b, x, y) → if2(b, x, y)
if1(true, x, y) → cons(0, nil)
if1(false, x, y) → cons(0, int(s(0), y))
if2(true, x, y) → nil
if2(false, x, y) → intlist(int(p(x), p(y)))
Rewrite Strategy: FULL
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
empty(nil) → true
empty(cons(x, y)) → false
tail(nil) → nil
tail(cons(x, y)) → y
head(cons(x, y)) → x
zero(0') → true
zero(s(x)) → false
p(0') → 0'
p(s(0')) → 0'
p(s(s(x))) → s(p(s(x)))
intlist(x) → if_intlist(empty(x), x)
if_intlist(true, x) → nil
if_intlist(false, x) → cons(s(head(x)), intlist(tail(x)))
int(x, y) → if_int(zero(x), zero(y), x, y)
if_int(true, b, x, y) → if1(b, x, y)
if_int(false, b, x, y) → if2(b, x, y)
if1(true, x, y) → cons(0', nil)
if1(false, x, y) → cons(0', int(s(0'), y))
if2(true, x, y) → nil
if2(false, x, y) → intlist(int(p(x), p(y)))
S is empty.
Rewrite Strategy: FULL
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
if1/1
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
empty(nil) → true
empty(cons(x, y)) → false
tail(nil) → nil
tail(cons(x, y)) → y
head(cons(x, y)) → x
zero(0') → true
zero(s(x)) → false
p(0') → 0'
p(s(0')) → 0'
p(s(s(x))) → s(p(s(x)))
intlist(x) → if_intlist(empty(x), x)
if_intlist(true, x) → nil
if_intlist(false, x) → cons(s(head(x)), intlist(tail(x)))
int(x, y) → if_int(zero(x), zero(y), x, y)
if_int(true, b, x, y) → if1(b, y)
if_int(false, b, x, y) → if2(b, x, y)
if1(true, y) → cons(0', nil)
if1(false, y) → cons(0', int(s(0'), y))
if2(true, x, y) → nil
if2(false, x, y) → intlist(int(p(x), p(y)))
S is empty.
Rewrite Strategy: FULL
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
TRS:
Rules:
empty(nil) → true
empty(cons(x, y)) → false
tail(nil) → nil
tail(cons(x, y)) → y
head(cons(x, y)) → x
zero(0') → true
zero(s(x)) → false
p(0') → 0'
p(s(0')) → 0'
p(s(s(x))) → s(p(s(x)))
intlist(x) → if_intlist(empty(x), x)
if_intlist(true, x) → nil
if_intlist(false, x) → cons(s(head(x)), intlist(tail(x)))
int(x, y) → if_int(zero(x), zero(y), x, y)
if_int(true, b, x, y) → if1(b, y)
if_int(false, b, x, y) → if2(b, x, y)
if1(true, y) → cons(0', nil)
if1(false, y) → cons(0', int(s(0'), y))
if2(true, x, y) → nil
if2(false, x, y) → intlist(int(p(x), p(y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
p,
intlist,
int,
if1They will be analysed ascendingly in the following order:
p < int
intlist < int
int = if1
(8) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
p, intlist, int, if1
They will be analysed ascendingly in the following order:
p < int
intlist < int
int = if1
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
p(
gen_0':s5_0(
+(
1,
n7_0))) →
gen_0':s5_0(
n7_0), rt ∈ Ω(1 + n7
0)
Induction Base:
p(gen_0':s5_0(+(1, 0))) →RΩ(1)
0'
Induction Step:
p(gen_0':s5_0(+(1, +(n7_0, 1)))) →RΩ(1)
s(p(s(gen_0':s5_0(n7_0)))) →IH
s(gen_0':s5_0(c8_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
intlist, int, if1
They will be analysed ascendingly in the following order:
intlist < int
int = if1
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
intlist(
gen_nil:cons4_0(
n312_0)) →
*6_0, rt ∈ Ω(n312
0)
Induction Base:
intlist(gen_nil:cons4_0(0))
Induction Step:
intlist(gen_nil:cons4_0(+(n312_0, 1))) →RΩ(1)
if_intlist(empty(gen_nil:cons4_0(+(n312_0, 1))), gen_nil:cons4_0(+(n312_0, 1))) →RΩ(1)
if_intlist(false, gen_nil:cons4_0(+(1, n312_0))) →RΩ(1)
cons(s(head(gen_nil:cons4_0(+(1, n312_0)))), intlist(tail(gen_nil:cons4_0(+(1, n312_0))))) →RΩ(1)
cons(s(0'), intlist(tail(gen_nil:cons4_0(+(1, n312_0))))) →RΩ(1)
cons(s(0'), intlist(gen_nil:cons4_0(n312_0))) →IH
cons(s(0'), *6_0)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
if1, int
They will be analysed ascendingly in the following order:
int = if1
(15) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol if1.
(16) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
int
They will be analysed ascendingly in the following order:
int = if1
(17) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
int(
gen_0':s5_0(
+(
1,
n37914_0)),
gen_0':s5_0(
n37914_0)) →
gen_nil:cons4_0(
0), rt ∈ Ω(1 + n37914
0 + n37914
02)
Induction Base:
int(gen_0':s5_0(+(1, 0)), gen_0':s5_0(0)) →RΩ(1)
if_int(zero(gen_0':s5_0(+(1, 0))), zero(gen_0':s5_0(0)), gen_0':s5_0(+(1, 0)), gen_0':s5_0(0)) →RΩ(1)
if_int(false, zero(gen_0':s5_0(0)), gen_0':s5_0(1), gen_0':s5_0(0)) →RΩ(1)
if_int(false, true, gen_0':s5_0(1), gen_0':s5_0(0)) →RΩ(1)
if2(true, gen_0':s5_0(1), gen_0':s5_0(0)) →RΩ(1)
nil
Induction Step:
int(gen_0':s5_0(+(1, +(n37914_0, 1))), gen_0':s5_0(+(n37914_0, 1))) →RΩ(1)
if_int(zero(gen_0':s5_0(+(1, +(n37914_0, 1)))), zero(gen_0':s5_0(+(n37914_0, 1))), gen_0':s5_0(+(1, +(n37914_0, 1))), gen_0':s5_0(+(n37914_0, 1))) →RΩ(1)
if_int(false, zero(gen_0':s5_0(+(1, n37914_0))), gen_0':s5_0(+(2, n37914_0)), gen_0':s5_0(+(1, n37914_0))) →RΩ(1)
if_int(false, false, gen_0':s5_0(+(2, n37914_0)), gen_0':s5_0(+(1, n37914_0))) →RΩ(1)
if2(false, gen_0':s5_0(+(2, n37914_0)), gen_0':s5_0(+(1, n37914_0))) →RΩ(1)
intlist(int(p(gen_0':s5_0(+(2, n37914_0))), p(gen_0':s5_0(+(1, n37914_0))))) →LΩ(2 + n379140)
intlist(int(gen_0':s5_0(+(1, n37914_0)), p(gen_0':s5_0(+(1, n37914_0))))) →LΩ(1 + n379140)
intlist(int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0))) →IH
intlist(gen_nil:cons4_0(0)) →RΩ(1)
if_intlist(empty(gen_nil:cons4_0(0)), gen_nil:cons4_0(0)) →RΩ(1)
if_intlist(true, gen_nil:cons4_0(0)) →RΩ(1)
nil
We have rt ∈ Ω(n2) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n2).
(18) Complex Obligation (BEST)
(19) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0)) → gen_nil:cons4_0(0), rt ∈ Ω(1 + n379140 + n3791402)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
if1
They will be analysed ascendingly in the following order:
int = if1
(20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol if1.
(21) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0)) → gen_nil:cons4_0(0), rt ∈ Ω(1 + n379140 + n3791402)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(22) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0)) → gen_nil:cons4_0(0), rt ∈ Ω(1 + n379140 + n3791402)
(23) BOUNDS(n^2, INF)
(24) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0)) → gen_nil:cons4_0(0), rt ∈ Ω(1 + n379140 + n3791402)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(25) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n2) was proven with the following lemma:
int(gen_0':s5_0(+(1, n37914_0)), gen_0':s5_0(n37914_0)) → gen_nil:cons4_0(0), rt ∈ Ω(1 + n379140 + n3791402)
(26) BOUNDS(n^2, INF)
(27) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
intlist(gen_nil:cons4_0(n312_0)) → *6_0, rt ∈ Ω(n3120)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(28) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
(29) BOUNDS(n^1, INF)
(30) Obligation:
TRS:
Rules:
empty(
nil) →
trueempty(
cons(
x,
y)) →
falsetail(
nil) →
niltail(
cons(
x,
y)) →
yhead(
cons(
x,
y)) →
xzero(
0') →
truezero(
s(
x)) →
falsep(
0') →
0'p(
s(
0')) →
0'p(
s(
s(
x))) →
s(
p(
s(
x)))
intlist(
x) →
if_intlist(
empty(
x),
x)
if_intlist(
true,
x) →
nilif_intlist(
false,
x) →
cons(
s(
head(
x)),
intlist(
tail(
x)))
int(
x,
y) →
if_int(
zero(
x),
zero(
y),
x,
y)
if_int(
true,
b,
x,
y) →
if1(
b,
y)
if_int(
false,
b,
x,
y) →
if2(
b,
x,
y)
if1(
true,
y) →
cons(
0',
nil)
if1(
false,
y) →
cons(
0',
int(
s(
0'),
y))
if2(
true,
x,
y) →
nilif2(
false,
x,
y) →
intlist(
int(
p(
x),
p(
y)))
Types:
empty :: nil:cons → true:false
nil :: nil:cons
true :: true:false
cons :: 0':s → nil:cons → nil:cons
false :: true:false
tail :: nil:cons → nil:cons
head :: nil:cons → 0':s
zero :: 0':s → true:false
0' :: 0':s
s :: 0':s → 0':s
p :: 0':s → 0':s
intlist :: nil:cons → nil:cons
if_intlist :: true:false → nil:cons → nil:cons
int :: 0':s → 0':s → nil:cons
if_int :: true:false → true:false → 0':s → 0':s → nil:cons
if1 :: true:false → 0':s → nil:cons
if2 :: true:false → 0':s → 0':s → nil:cons
hole_true:false1_0 :: true:false
hole_nil:cons2_0 :: nil:cons
hole_0':s3_0 :: 0':s
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(0', gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(31) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
p(gen_0':s5_0(+(1, n7_0))) → gen_0':s5_0(n7_0), rt ∈ Ω(1 + n70)
(32) BOUNDS(n^1, INF)